/**
 * Copyright (c) 2013-Now http://jeesite.com All rights reserved.
 * No deletion without permission, or be held responsible to law.
 * @author LYS
 */
import { defHttp } from '/@/utils/http/axios';
import { useGlobSetting } from '/@/hooks/setting';
import { BasicModel, Page } from '../model/baseModel';

const { adminPath } = useGlobSetting();

export interface QueslibTmpl extends BasicModel<QueslibTmpl> {
  code?: string; // 模板编码
  ctype?: string; // 问题类型
  ccontent?: string; // 模板内容
}

export const queslibTmplList = (params?: QueslibTmpl | any) =>
  defHttp.get<QueslibTmpl>({ url: adminPath + '/queslib/tmpl/queslibTmpl/list', params });

export const queslibTmplListData = (params?: QueslibTmpl | any) =>
  defHttp.post<Page<QueslibTmpl>>({ url: adminPath + '/queslib/tmpl/queslibTmpl/listData', params });

export const queslibTmplForm = (params?: QueslibTmpl | any) =>
  defHttp.get<QueslibTmpl>({ url: adminPath + '/queslib/tmpl/queslibTmpl/form', params });

export const queslibTmplSave = (params?: any, data?: QueslibTmpl | any) =>
  defHttp.postJson<QueslibTmpl>({ url: adminPath + '/queslib/tmpl/queslibTmpl/save', params, data });

export const queslibTmplDelete = (params?: QueslibTmpl | any) =>
  defHttp.get<QueslibTmpl>({ url: adminPath + '/queslib/tmpl/queslibTmpl/delete', params });
